package com.candy.bean;

public class Test02 {
    public static void main(String[] args) {
        test03();
    }

    public static void test01() {
//        创建对象
        Student stu01=new Student();
        System.out.println("stu01++++++++++++++");
        System.out.println(stu01);
        Student stu02=new Student();
        System.out.println("stu02++++++++++++++");
        System.out.println(stu02);

    }

    public static void test02() {
        Student stu03=new Student(1001,"tom",true);
    }

    public static void test03() {
        Student stu03=new Student(1001,"tom",true);
        Teacher tea1=new Teacher();
//        tea1.tname="马老师";
//        讲教师作为参数传递进来
//        注意：形参怎么设计，实参要怎么传递
        stu03.study(tea1);

    }

}
